package com.yjj.im.Utils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import org.java_websocket.WebSocket;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;


import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.util.Log;

import com.google.gson.Gson;
public class MyWebsocketClient extends WebSocketClient{
    private WebSocketListener listener;
    
    public MyWebsocketClient(URI serverUri){
        super(serverUri);
    }
    @Override
    public void onOpen(ServerHandshake handshakedata) {
      listener.onOpen();


    }

    @Override
    public void onMessage(String message) {
        listener.onTextMessage(message);
    }

    @Override
    public void onClose(int code, String reason, boolean remote) {
        listener.onClose(code,reason);
    }

    @Override
    public void onError(Exception ex) {
        listener.onFailure(ex);
    }

    public void initWebSocket(){

    }
}
